<!--一打开就是这个页面，注册完跳回这个页面，普通用户登录也跳转回这个页面-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>图书列表（登录前）</title>
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.js"></script>
    <link href="https://cdn.bootcss.com/twitter-bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/twitter-bootstrap/3.4.1/js/bootstrap.min.js"></script>
    <script>alert("请先登录")</script>
</head>
<body>
<!--图书馆管理系统页面-->
<nav class="navbar navbar-inverse">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">资料室图书管理系统</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li class="active"><a href="{{ url_for('register.register') }}"> 注册 <span class="sr-only">(current)</span></a></li>
      </ul>
      <form class="navbar-form navbar-left" method="post">
        <div class="form-group">
          <input type="text" class="form-control" placeholder="账号" id="loginId" name="loginId">
        </div>
        <button type="submit" class="btn btn-default">登录</button>
      </form>
      <ul class="nav navbar-nav navbar-right">
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">更多操作 <span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="#">注销</a></li>
          </ul>
        </li>
      </ul>
    </div>
  </div>
</nav>
<div class="container">
    <div class="row">
        <div class="col-md-2">
            <div class="list-group">
          <a href="#" class="list-group-item active">
            图书列表
          </a>
</div>
        </div>
        <div class="col-md-10">
            <div class="panel panel-primary">
              <div class="panel-heading clearfix">
                <h3 class="panel-title">图书馆管理系统<span class="glyphicon glyphicon-leaf pull-right"></span></h3>
              </div>
              <div class="panel-body">
                  <form class="form-inline pull-right">
                      <div class="form-group">
                        <div class="input-group">
                          <input type="text" class="form-control" id="exampleInputAmount" placeholder="编号">
                        </div>
                      </div>
                      <button type="submit" class="btn btn-primary">搜索</button>
                    </form>
                  <table class="table table-hover table-striped table-bordered" style="margin-top: 10px">
                      <thead>
                          <tr>
                              <th>编号</th>
                              <th>书名</th>
                              <th>目录1</th>
                              <th>目录2</th>
                              <th>描述</th>
                              <th>借阅情况</th>
                              <th>时间</th>
                              <th>内容</th>
                              <th>封面</th>
                              <th>价格</th>
                              <th>分数</th>
                          </tr>
                      </thead>
                      <tbody>
                      {% for book in books %}
                          <tr>
                          <td>{{ book.bid }}</td>
                          <td>{{ book.bname }}</td>
                          <td>{{ book.category1 }}</td>
                          <td>{{ book.category2 }}</td>
                          <td>{{ book.description }}</td>
                          <td>{{ book.isLoaned }}</td>
                          <td>{{ book.times }}</td>
                          <td>{{ book.content }}</td>
                          <td><img width="90px" height="120px" src='{{ book.cover }}'></td>
                          <td>{{ book.price }}</td>
                          <td>{{ book.score }}</td>
                      </tr>
                      {% endfor %}
                      </tbody>
                  </table>

              </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
